import copy


class TasksGroupAide:
    cfg = [
        {'label': 'ID', 'field': 'id', 'required': True},
        {'label': '分组名称', 'field': 'name', 'required': True},
    ]

    @classmethod
    def edit_cfg(cls):
        cfg = copy.deepcopy(cls.cfg)
        for field in ['id']:
            for idx, itm in enumerate(cfg):
                if itm['field'] == field:
                    del cfg[idx]
                    break
        return cfg
